'use strict';
app.controller('ProductsCtrl', function($scope,$stateParams,BaseFactory) {

    var pid = $stateParams.id ;
    $scope.imgUrls = [] ;
    BaseFactory.productInfo(pid).then(function(data){
        var pro = data[0];
        $scope.imgUrls = JSON.parse(pro.imgUrl) || [];
        $scope.product = pro ;
        console.log(pro)
    });

  })

